
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
import { constantRoutes } from './routes';  // 导入路由配置
import routerGuard from './guard';  // 引入路由守卫

// 创建路由实例
const router = createRouter({
  history: createWebHistory(),
  routes: constantRoutes,
});

// 启用路由守卫
routerGuard(router);

export default router;
